package com.xquant.databasemanagement.bean;


import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class CommonObject extends DataBaseObject {
    private String oracleSQL;

    private String mySQL;

    public String getOracleSQL() {
        return oracleSQL;
    }

    public void setOracleSQL(String oracleSQL) {
        this.oracleSQL = oracleSQL;
    }

    public String getMySQL() {
        return mySQL;
    }

    public void setMySQL(String mySQL) {
        this.mySQL = mySQL;
    }


    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof CommonObject){
            CommonObject commonBean = (CommonObject)obj;
            return commonBean.getMySQL().equals(this.getMySQL())
                    && commonBean.getOracleSQL().equals(this.getOracleSQL())
                    && commonBean.getName().equals(this.getName());
        }
        return false;
    }
}
